package zust.javaee.enums.player;

/**
 * Created by liy on 2017/1/7.
 */
public enum PlayerStatusEnum {

    QUIT((short)-2,"被禁用"),
    DELETED((short)-1,"已删除"),
    CHECKING((short)0,"待验证"),
    AVAILABLE((short)1,"可用");

    private Short status;

    private String info;


    public static PlayerStatusEnum stateOf(int index) {
        for (PlayerStatusEnum e : values()) {
            if (e.getStatus() == index) {
                return e;
            }
        }
        return null;
    }


    private PlayerStatusEnum(Short status, String info) {
        this.status = status;
        this.info = info;
    }

    public Short getStatus() {
        return status;
    }

    public void setStatus(Short status) {
        this.status = status;
    }

    public String getInfo() {
        return info;
    }

    public void setInfo(String info) {
        this.info = info;
    }

}
